using System;
using System.Collections.Generic;
using System.Security.Permissions;
using System.Data;
using Microsoft.Dynamics.Framework.Reports;
public partial class Report1
{
    [DataMethod(), AxSessionPermission(SecurityAction.Assert)]
    public static string GetSpecialTitle()
    {
        string s = string.Format("Hello World {0}", 1 + 2);
        return s;
    }

    [DataMethod(), AxSessionPermission(SecurityAction.Assert)]
    public static System.Data.DataTable GetPlayerData()
    {
        var dt = new System.Data.DataTable();
        dt.Columns.Add("Name", typeof(string));
        dt.Columns.Add("Score", typeof(int));

        dt.Rows.Add("Ryu", 101);
        dt.Rows.Add("Ken", 78);
        dt.Rows.Add("Akuma", 152);

        return dt;

    }

    [DataMethod(), AxSessionPermission(SecurityAction.Assert)]
    public static System.Data.DataTable GetCustTableSRS()
    {
        var dt = Microsoft.Dynamics.Framework.Reports.AxQuery.ExecuteQuery("Select * from CustTableSRS");

        return dt;
    }

    [DataMethod(), AxSessionPermission(SecurityAction.Assert)]
    public static System.Data.DataTable GetCustTableSRSWithRange(int custgroup)
    {
        var ranges = new Dictionary<string, object>
        {
            { "CustTable.CustGroup", custgroup}
        };
        var dt = Microsoft.Dynamics.Framework.Reports.AxQuery.ExecuteQuery("Select * from CustTableSRS",ranges);

        return dt;
    }
}
